<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>能力考查系统</title>
<meta name="description" content="针对java考试和c语言考核、学生平时练习和评测、收集学生成绩以及学习情况的收集和分析的一个在线考核系统">
<meta name="keywords" content="个人主页,编程练习">
<link rel="stylesheet" href="__PUBLIC__/student/css/paper.css">
<link rel="stylesheet" href="__PUBLIC__/student/css/common.css">


<link rel="stylesheet" href="__PUBLIC__/student/css/header_foot.css">
<link rel="stylesheet" href="__PUBLIC__/student/SemanticUI/semantic.min.css">
<link href="__PUBLIC__/student/font-awesome/css/font-awesome.min.css" rel="stylesheet">


</head>
<body>
    	<!-- <include file='Public:header' /> -->
    <div class="box">
    
        
        <div class="paper_box">
            
            <h3 class="ui black block header" style="text-align: center;"> 
                <span style="padding-right: 15px;">{$paperInfo['name']}</span>  
                <span style="padding-right: 15px;">总分:{$paperInfo['full_score']}</span>
                <span style="padding-right: 15px;">及格分数:{$paperInfo['pass_score']}</span>
            </h3>
                    
            <div class="paper_topic">   
                <!-- 进度条 -->
                <div class="ui progress indicating blue" id="subject_progress" >
                  <div class="bar">
                    <div class="progress"></div>
                  </div>
                </div>

                
                <!-- 内容 -->
                <div class="subject_main">
                    <form class="ui form">

                    <foreach name="question" item="vo" key="k" >
   
                        <div class="grouped fields">       
                            <label name="{$k+1}" for="question_content" data-id="{$vo['id']}">{$k+1}.<?php echo html_entity_decode($vo['content']);?>：</label>
                            
                            <switch name="vo['type']" >
                                <case value='1'>
                                    <foreach name="vo['answer']" item='v1' key="k1">
                                        <div class="field">
                                          <div class="ui radio checkbox">
                                            <input type="radio" name="question_{$vo['id']}" data-anId="{$v1['id']}" value="{$v1['content']}">
                                            <label>{$v1['content']}</label>
                                          </div>
                                        </div>
                                    </foreach>
                                </case>
                                    
                                <case value='2'>
                                    <div class="field">
                                      <div class="ui radio checkbox">
                                        <input type="radio" name="question_{$vo['id']}" value="T">
                                        <label data-anId="{$vo['answer'][0]['id']}">T</label>
                                      </div>
                                    </div>
                                    <div class="field">
                                        <div class="ui radio checkbox">
                                            <input type="radio" name="question_{$vo['id']}" value="F">
                                            <label data-anId="{$vo['answer'][0]['id']}">F</label>
                                        </div>
                                    </div>
                                </case>

                                <case value='3'>
                                    <div class="field">
                                        <div class="ui input">
                                            <input type="text" placeholder="请输入答案" name="question_{$vo['id']}" data-anId="{$vo['answer'][0]['id']}">
                                        </div>
                                    </div>
                                </case>

                            </switch>

                           
                        </div>
                        
                    </foreach>

                        <!-- 动作 -->
                        <div class='subject_action'>
                                <div class="ui blue  confirm button">提交</div>
                   
                        </div>
                    </form>

                </div>
                
                

                 <div style="clear: both;"></div>   
                
                <!-- 倒计时 -->
                <div class="time">
                    <div class="ui card  Countdown">
                        <div class="content">
                          <div class="description">
                            <div class="count_down">00:00:00</div>
                          </div>
                        </div>
                    </div>
     
                    <div class="ui labeled icon button showTime" style="float: right;">
                      <i class="idea icon"></i>
                      <span class="text">显示</span>
                    </div>
                </div>


                <!-- 答题卡 -->
                <div class="answer_sheet clear">
                      <div class="ui card  Countdown">
                        <div class="content">
                           <span class="ui blue ribbon label">答题卡</span>
                            <div class="description sheet">

                                <foreach name="question" item="vo" key="k" >
                                    <div class="ui animated button goToTheSheet" id="question_{$vo['id']}">
                                      <div class="visible content">{$k+1}</div>
                                      <div class="hidden content">
                                        <i class="right arrow icon"></i>
                                      </div>
                                    </div>
                                </foreach>
                
                            </div>
                        </div>
                    </div>
                </div>  

            </div>
        </div>
    
        <!-- 弹出层 -->
        <div class="ui basic modal">
          <i class="close icon"></i>
          <div class="header">
            你存在未完成的试题
          </div>
          <div class="image content">
            <div class="description">
              <p>您是否还想继续答题?</p>
            </div>
          </div>
          <div class="actions">
            <div class="two fluid ui inverted buttons">
              <div class="ui cancel red basic inverted button">
                <i class="remove icon"></i>
                我还想得分!
              </div>
              <div class="ui ok green basic inverted button">
                <i class="checkmark icon"></i>
                我就要提交试卷!
              </div>
            </div>
          </div>
        </div>

        <div class="ui small modal">
          <div class="header">提交试卷</div>
          <div class="content">
            <p id="alert_text"></p>
          </div>
          <div class="actions">
            <div class="ui approve button">确定</div>
          </div>
        </div>


        <include file='Public:foot' />
    
    </div>
</body>
</html>

<script type="text/javascript">
    var index = '{:U("Student/IndexMgr/index")}';
    var untilTime = "{$paperInfo['end_time']}";
    var CheckAnswer = '{:U("Student/testPaper/CheckAnswer")}';
    var paper_id = "{$paperInfo['id']}";

</script>

<script src="__PUBLIC__/student/js/jquery-3.1.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="__PUBLIC__/student/js/jquery-tab.js"></script>
<script src="__PUBLIC__/student/SemanticUI/semantic.min.js"></script>
<script src="__PUBLIC__/student/js/jquery.plugin.min.js"></script>
<script src="__PUBLIC__/student/js/jquery.countdown.min.js"></script>
<script src="__PUBLIC__/student/js/testPaper.js"></script>

